﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="corpinfoset.aspx.cs" Inherits="LTJ.WebPage.UserManage.infoset.corpinfoset" %>
<%@ Register TagPrefix="dyj" Namespace="LTJ.Control" Assembly="LTJ.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>企业信息管理</title>
    <link href="../css/comm.css" type="text/css" rel="stylesheet" />
    <script language="javascript" type="text/javascript" src="../js/common.js"></script>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <div class="adnr">
    <fieldset>
                <legend id="opt" style="background: url(../images/icons/icon53.jpg) no-repeat 6px 50%;">
                    公司信息维护</legend>
                <table cellspacing="0" cellpadding="4" class="adtb" width="80%">
                    <tr>
                        <td width="25%"><p class="zi1">公司名称:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="cname" CanBeNull="必填" RequiredFieldType="暂无校验" MaxLength="100" Enabled="false"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">英文名称:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="ecname" CanBeNull="必填" RequiredFieldType="暂无校验" MaxLength="100" Enabled="false"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">主营业务:</p>
                        </td>
                        <td>
                            <p class="zi2">
                            <%
                                LTJ.Entity.MainEnum menum = new LTJ.Entity.MainEnum();
                                foreach (string mname in Enum.GetNames(menum.GetType()))
                                {
                                    int s_value = Convert.ToInt16(Enum.Parse(menum.GetType(), mname));
                                    string s_text = LTJ.Entity.EnumType.GetMainEnumType(s_value);
                            %>
                            <input disabled="true" name="mainstr" value="<%=s_value%>" type="checkbox" <%=(","+companyinfo.Mains+",").Contains("," + s_value + ",")?"checked":""%>/><%=s_text%>
                            <%
                                }
                            %>
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">联 系 人:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="relater" CanBeNull="必填" MaxLength="10" RequiredFieldType="暂无校验"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">联系电话:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="phone" CanBeNull="必填" RequiredFieldType="移动手机"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">电子邮箱:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="email" RequiredFieldType="电子邮箱"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">公司网址:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="weburl" RequiredFieldType="网页地址"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">MSN:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="msn" RequiredFieldType="电子邮箱"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">其他联系方式:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="relateform" CanBeNull="可为空" TextMode="MultiLine" Height="50" Width="300" MaxLength="200"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">公司简介:</p>
                        </td>
                        <td>
                            <p class="zi2"><dyj:TextBox runat="server" ID="bio" CanBeNull="可为空" TextMode="MultiLine" Height="50" Width="300" MaxLength="2000"></dyj:TextBox></p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">公司Logo:</p>
                        </td>
                        <td>
                            <p class="zi2" id="qylogo"><input type="file" id="clogo" onchange="PhotoView()" name="clogo"/> 最佳尺寸为129px X 129px</p>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <p class="zi1">Logo图例:</p>
                        </td>
                        <td>
                            <p class="zi2" id="P1"><img src="<%=companyinfo.logo%>" /></p>
                        </td>
                    </tr>
                    <tr>
                    <td>&nbsp;</td>
                    <td><p class="zi2"><dyj:Button runat="server" ID="editcorp"/>&nbsp;&nbsp;<button class="MgButton" id="cancel" onclick="form1.reset();"><img src="../images/del.gif"/>重 置</button></p></td>
                    </tr>
                </table>
            </fieldset>
    </div>
    </form>
</body>
<script type="text/javascript">
    function PhotoView() {
        var file = document.getElementById("clogo").value;
        if (file != "") {
            var patn = /\.jpg$|\.jpeg$|\.gif$|\.png$/i;
            if (!patn.test(file)) {
                clearFileInput(document.getElementById("clogo"));
                alert("相册只允许jpg、jpeg、gif或png格式的图片!");
                return;
            }
        }
    }

    function clearFileInput(file) {
        var form = document.createElement('form');
        document.body.appendChild(form);
        form.appendChild(file);
        form.reset();
        document.getElementById("qylogo").appendChild(file);
        document.body.removeChild(form);
    }
</script>
</html>
